package com.csii.modules.online.auth.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csii.modules.online.auth.entity.OnlAuthData;
import com.csii.modules.online.auth.entity.OnlAuthRelation;
import com.csii.modules.online.auth.mapper.OnlAuthDataMapper;
import com.csii.modules.online.auth.mapper.OnlAuthRelationMapper;
import com.csii.modules.online.auth.service.IOnlAuthDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * onlAuthDataServiceImpl
 */
@Service("onlAuthDataServiceImpl")
public class OnlAuthDataServiceImpl extends ServiceImpl<OnlAuthDataMapper, OnlAuthData> implements IOnlAuthDataService {
	@Autowired
	private OnlAuthRelationMapper onlAuthRelationMapper;

	public void deleteOne(String id) {
		this.removeById(id);
		LambdaQueryWrapper<OnlAuthRelation> wrapper = new LambdaQueryWrapper(OnlAuthRelation.class);
		this.onlAuthRelationMapper.delete((Wrapper) wrapper.eq(OnlAuthRelation::getAuthId, id));
	}
}
